(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[63,59,60],{122:function(e,t,n){"use strict";n.d(t,"b",(function(){return d})),n.d(t,"a",(function(){return m}));var c=n(0),a=n(5),s=n(3),o=n(16),r=n.n(o),i=n(70),l=n(154);const u=Object(c.createContext)({onPaymentProcessing:()=>()=>()=>{},onPaymentSetup:()=>()=>()=>{}}),d=()=>Object(c.useContext)(u),m=({children:e})=>{const{isProcessing:t,isIdle:n,isCalculating:o,hasError:d}=Object(a.useSelect)((e=>{const t=e(s.CHECKOUT_STORE_KEY);return{isProcessing:t.isProcessing(),isIdle:t.isIdle(),hasError:t.hasError(),isCalculating:t.isCalculating()}})),{isPaymentReady:m}=Object(a.useSelect)((e=>{const t=e(s.PAYMENT_STORE_KEY);return{isPaymentProcessing:t.isPaymentProcessing(),isPaymentReady:t.isPaymentReady()}})),{setValidationErrors:b}=Object(a.useDispatch)(s.VALIDATION_STORE_KEY),[y,p]=Object(c.useReducer)(i.b,{}),{onPaymentSetup:f}=(e=>Object(c.useMemo)((()=>({onPaymentSetup:Object(l.a)("payment_setup",e)})),[e]))(p),v=Object(c.useRef)(y);Object(c.useEffect)((()=>{v.current=y}),[y]);const{__internalSetPaymentProcessing:g,__internalSetPaymentIdle:h,__internalEmitPaymentProcessingEvent:O}=Object(a.useDispatch)(s.PAYMENT_STORE_KEY);Object(c.useEffect)((()=>{!t||d||o||(g(),O(v.current,b))}),[t,d,o,g,O,b]),Object(c.useEffect)((()=>{n&&!m&&h()}),[n,m,h]),Object(c.useEffect)((()=>{d&&m&&h()}),[d,m,h]);const j={onPaymentProcessing:Object(c.useMemo)((()=>function(...e){return r()("onPaymentProcessing",{alternative:"onPaymentSetup",plugin:"WooCommerce Blocks"}),f(...e)}),[f]),onPaymentSetup:f};return Object(c.createElement)(u.Provider,{value:j},e)}},27:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var c=n(0),a=n(14),s=n.n(a);function o(e){const t=Object(c.useRef)(e);return s()(e,t.current)||(t.current=e),t.current}},286:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var c=function(){return c=Object.assign||function(e){for(var t,n=1,c=arguments.length;n<c;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},c.apply(this,arguments)};Object.create,Object.create},287:function(e,t,n){"use strict";function c(e){return e.toLowerCase()}n.d(t,"a",(function(){return o}));var a=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],s=/[^A-Z0-9]+/gi;function o(e,t){void 0===t&&(t={});for(var n=t.splitRegexp,o=void 0===n?a:n,i=t.stripRegexp,l=void 0===i?s:i,u=t.transform,d=void 0===u?c:u,m=t.delimiter,b=void 0===m?" ":m,y=r(r(e,o,"$1\0$2"),l,"\0"),p=0,f=y.length;"\0"===y.charAt(p);)p++;for(;"\0"===y.charAt(f-1);)f--;return y.slice(p,f).split("\0").map(d).join(b)}function r(e,t,n){return t instanceof RegExp?e.replace(t,n):t.reduce((function(e,t){return e.replace(t,n)}),e)}},290:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var c=n(286),a=n(287);function s(e,t){return void 0===t&&(t={}),function(e,t){return void 0===t&&(t={}),Object(a.a)(e,Object(c.a)({delimiter:"."},t))}(e,Object(c.a)({delimiter:"-"},t))}},291:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var c=n(4),a=n.n(c),s=n(20),o=n(29),r=n(290),i=n(132);function l(e={}){const t={};return Object(i.getCSSRules)(e,{selector:""}).forEach((e=>{t[e.key]=e.value})),t}function u(e,t){return e&&t?`has-${Object(r.a)(t)}-${e}`:""}const d=e=>{const t=(e=>{const t=Object(s.a)(e)?e:{style:{}};let n=t.style;return Object(o.a)(n)&&(n=JSON.parse(n)||{}),Object(s.a)(n)||(n={}),{...t,style:n}})(e),n=function(e){var t,n,c,o,r,i,d;const{backgroundColor:m,textColor:b,gradient:y,style:p}=e,f=u("background-color",m),v=u("color",b),g=function(e){if(e)return`has-${e}-gradient-background`}(y),h=g||(null==p||null===(t=p.color)||void 0===t?void 0:t.gradient);return{className:a()(v,g,{[f]:!h&&!!f,"has-text-color":b||(null==p||null===(n=p.color)||void 0===n?void 0:n.text),"has-background":m||(null==p||null===(c=p.color)||void 0===c?void 0:c.background)||y||(null==p||null===(o=p.color)||void 0===o?void 0:o.gradient),"has-link-color":Object(s.a)(null==p||null===(r=p.elements)||void 0===r?void 0:r.link)?null==p||null===(i=p.elements)||void 0===i||null===(d=i.link)||void 0===d?void 0:d.color:void 0}),style:l({color:(null==p?void 0:p.color)||{}})}}(t),c=function(e){var t;const n=(null===(t=e.style)||void 0===t?void 0:t.border)||{};return{className:function(e){var t;const{borderColor:n,style:c}=e,s=n?u("border-color",n):"";return a()({"has-border-color":!!n||!(null==c||null===(t=c.border)||void 0===t||!t.color),[s]:!!s})}(e),style:l({border:n})}}(t),r=function(e){var t;return{className:void 0,style:l({spacing:(null===(t=e.style)||void 0===t?void 0:t.spacing)||{}})}}(t),i=(e=>{const t=Object(s.a)(e.style.typography)?e.style.typography:{},n=Object(o.a)(t.fontFamily)?t.fontFamily:"";return{className:e.fontFamily?`has-${e.fontFamily}-font-family`:n,style:{fontSize:e.fontSize?`var(--wp--preset--font-size--${e.fontSize})`:t.fontSize,fontStyle:t.fontStyle,fontWeight:t.fontWeight,letterSpacing:t.letterSpacing,lineHeight:t.lineHeight,textDecoration:t.textDecoration,textTransform:t.textTransform}}})(t);return{className:a()(i.className,n.className,c.className,r.className),style:{...i.style,...n.style,...c.style,...r.style}}}},300:function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s}));var c=n(20);const a=(e="",t)=>e.includes("is-style-outline")?"outlined":e.includes("is-style-fill")?"contained":t,s=e=>e.some((e=>Array.isArray(e)?s(e):Object(c.a)(e)&&null!==e.key))},314:function(e,t){},322:function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return l}));var c=n(27),a=n(21),s=n(5),o=n(3);const r=(e=!1)=>{const{paymentMethodsInitialized:t,expressPaymentMethodsInitialized:n,availablePaymentMethods:r,availableExpressPaymentMethods:i}=Object(s.useSelect)((e=>{const t=e(o.PAYMENT_STORE_KEY);return{paymentMethodsInitialized:t.paymentMethodsInitialized(),expressPaymentMethodsInitialized:t.expressPaymentMethodsInitialized(),availableExpressPaymentMethods:t.getAvailableExpressPaymentMethods(),availablePaymentMethods:t.getAvailablePaymentMethods()}})),l=Object.values(r).map((({name:e})=>e)),u=Object.values(i).map((({name:e})=>e)),d=Object(a.getPaymentMethods)(),m=Object(a.getExpressPaymentMethods)(),b=Object.keys(d).reduce(((e,t)=>(l.includes(t)&&(e[t]=d[t]),e)),{}),y=Object.keys(m).reduce(((e,t)=>(u.includes(t)&&(e[t]=m[t]),e)),{}),p=Object(c.a)(b),f=Object(c.a)(y);return{paymentMethods:e?f:p,isInitialized:e?n:t}},i=()=>r(!1),l=()=>r(!0)},335:function(e,t,n){"use strict";var c=n(0),a=n(4),s=n.n(a);const o=e=>`wc-block-components-payment-method-icon wc-block-components-payment-method-icon--${e}`;var r=({id:e,src:t=null,alt:n=""})=>t?Object(c.createElement)("img",{className:o(e),src:t,alt:n}):null,i=n(30);const l=[{id:"alipay",alt:"Alipay",src:i.n+"payment-methods/alipay.svg"},{id:"amex",alt:"American Express",src:i.n+"payment-methods/amex.svg"},{id:"bancontact",alt:"Bancontact",src:i.n+"payment-methods/bancontact.svg"},{id:"diners",alt:"Diners Club",src:i.n+"payment-methods/diners.svg"},{id:"discover",alt:"Discover",src:i.n+"payment-methods/discover.svg"},{id:"eps",alt:"EPS",src:i.n+"payment-methods/eps.svg"},{id:"giropay",alt:"Giropay",src:i.n+"payment-methods/giropay.svg"},{id:"ideal",alt:"iDeal",src:i.n+"payment-methods/ideal.svg"},{id:"jcb",alt:"JCB",src:i.n+"payment-methods/jcb.svg"},{id:"laser",alt:"Laser",src:i.n+"payment-methods/laser.svg"},{id:"maestro",alt:"Maestro",src:i.n+"payment-methods/maestro.svg"},{id:"mastercard",alt:"Mastercard",src:i.n+"payment-methods/mastercard.svg"},{id:"multibanco",alt:"Multibanco",src:i.n+"payment-methods/multibanco.svg"},{id:"p24",alt:"Przelewy24",src:i.n+"payment-methods/p24.svg"},{id:"sepa",alt:"Sepa",src:i.n+"payment-methods/sepa.svg"},{id:"sofort",alt:"Sofort",src:i.n+"payment-methods/sofort.svg"},{id:"unionpay",alt:"Union Pay",src:i.n+"payment-methods/unionpay.svg"},{id:"visa",alt:"Visa",src:i.n+"payment-methods/visa.svg"},{id:"wechat",alt:"WeChat",src:i.n+"payment-methods/wechat.svg"}];var u=n(29);n(314),t.a=({icons:e=[],align:t="center",className:n})=>{const a=(e=>{const t={};return e.forEach((e=>{let n={};"string"==typeof e&&(n={id:e,alt:e,src:null}),"object"==typeof e&&(n={id:e.id||"",alt:e.alt||"",src:e.src||null}),n.id&&Object(u.a)(n.id)&&!t[n.id]&&(t[n.id]=n)})),Object.values(t)})(e);if(0===a.length)return null;const o=s()("wc-block-components-payment-method-icons",{"wc-block-components-payment-method-icons--align-left":"left"===t,"wc-block-components-payment-method-icons--align-right":"right"===t},n);return Object(c.createElement)("div",{className:o},a.map((e=>{const t={...e,...(n=e.id,l.find((e=>e.id===n))||{})};var n;return Object(c.createElement)(r,{key:"payment-method-icon-"+e.id,...t})})))}},420:function(e,t,n){"use strict";n.r(t);var c=n(0),a=n(30),s=n(112),o=n(4),r=n.n(o),i=n(291),l=n(1);const u=Object(l.__)("View my cart","woocommerce");var d=n(300);t.default=({className:e,cartButtonLabel:t,style:n})=>{const o=Object(i.a)({style:n});return a.c?Object(c.createElement)(s.a,{className:r()(e,o.className,"wc-block-mini-cart__footer-cart"),style:o.style,href:a.c,variant:Object(d.a)(e,"outlined")},t||u):null}},421:function(e,t,n){"use strict";n.r(t);var c=n(0),a=n(30),s=n(112),o=n(4),r=n.n(o),i=n(291),l=n(277),u=n(37),d=n(1);const m=Object(d.__)("Go to checkout","woocommerce");var b=n(300);t.default=({className:e,checkoutButtonLabel:t,style:n})=>{const o=Object(i.a)({style:n}),{dispatchOnProceedToCheckout:d}=Object(l.b)();return a.d?Object(c.createElement)(s.a,{className:r()(e,o.className,"wc-block-mini-cart__footer-checkout"),variant:Object(b.a)(e,"contained"),style:o.style,href:a.d,onClick:e=>{d().then((t=>{t.some(u.b)&&e.preventDefault()}))}},t||m):null}},448:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));const c=e=>Object.values(e).reduce(((e,t)=>(null!==t.icons&&(e=e.concat(t.icons)),e)),[])},496:function(e,t,n){"use strict";n.r(t);var c=n(0),a=n(1),s=n(12),o=n(39),r=n(322),i=n(72),l=n(335),u=n(448),d=n(2),m=n(122),b=n(4),y=n.n(b),p=n(420),f=n(421),v=n(300);const g=()=>{const{paymentMethods:e}=Object(r.b)();return Object(c.createElement)(l.a,{icons:Object(u.a)(e)})};t.default=({children:e,className:t,cartButtonLabel:n,checkoutButtonLabel:r})=>{const{cartTotals:l}=Object(i.a)(),u=Object(d.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(l.total_items,10)+parseInt(l.total_items_tax,10):parseInt(l.total_items,10),b=Object(v.b)(e);return Object(c.createElement)("div",{className:y()(t,"wc-block-mini-cart__footer")},Object(c.createElement)(s.TotalsItem,{className:"wc-block-mini-cart__footer-subtotal",currency:Object(o.getCurrencyFromPriceResponse)(l),label:Object(a.__)("Subtotal","woocommerce"),value:u,description:Object(a.__)("Shipping, taxes, and discounts calculated at checkout.","woocommerce")}),Object(c.createElement)("div",{className:"wc-block-mini-cart__footer-actions"},b?e:Object(c.createElement)(c.Fragment,null,Object(c.createElement)(p.default,{cartButtonLabel:n}),Object(c.createElement)(f.default,{checkoutButtonLabel:r}))),Object(c.createElement)(m.a,null,Object(c.createElement)(g,null)))}}}]);